package com.example.selfservicestation.extensions

import android.os.Bundle
import androidx.annotation.IdRes
import androidx.navigation.NavController

fun NavController.safeNavigate(@IdRes actionId: Int) {
    try {
        navigate(actionId)
    } catch (e: Exception) {
        // No need to do anything.
    }
}

fun NavController.safeNavigate(@IdRes actionId: Int,bundle: Bundle) {
    try {
        navigate(actionId,bundle)
    } catch (e: Exception) {
        // No need to do anything.
    }
}
